package ModelLayer;

/** 
 * @author (Gruppe 5) 
 * @version (04-04-2013)
 */

import java.util.Date;
import java.util.ArrayList;


public class SalesOrder
{
    // fields
    private Date Date;
    private String deliveryStatus;
    private Date deliveryDate;
    private int rentTime;
    private Customer c;
    private ArrayList<PartOrder> pO;
    
    /**
     * Constructor for objects of class SalesOrder
     */
	public SalesOrder(java.util.Date date, String deliveryStatus,
			java.util.Date deliveryDate, int rentTime, Customer c) {
		Date = date;
		this.deliveryStatus = deliveryStatus;
		this.deliveryDate = deliveryDate;
		this.rentTime = rentTime;
		c = null;
		pO = new ArrayList<PartOrder>();
	}

	//getters and setters
	
	public Date getDate() {
		return Date;
	}

	public void setDate(Date date) {
		Date = date;
	}

	public String getDeliveryStatus() {
		return deliveryStatus;
	}

	public void setDeliveryStatus(String deliveryStatus) {
		this.deliveryStatus = deliveryStatus;
	}

	public Date getDeliveryDate() {
		return deliveryDate;
	}

	public void setDeliveryDate(Date deliveryDate) {
		this.deliveryDate = deliveryDate;
	}

	public int getRentTime() {
		return rentTime;
	}

	public void setRentTime(int rentTime) {
		this.rentTime = rentTime;
	}
	
	public void setCustomer(Customer c)
	{
		this.c = c;
	}
	
	public Customer getCustomer()
	{
		return c;
	}
     
	public void addPartOrder(PartOrder p)
	{
		pO.add(p);
	}
	
    
}